package com.lemei.cn.lemeiapp;

import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.os.Bundle;
import android.widget.ImageView;

import com.lemei.cn.activity.LongInActivity;


public class SplashActivity extends BasicActivity {

    private ImageView mImageView;
    public static final int DURATION = 2000;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.splsah);
        mImageView = (ImageView) findViewById(R.id.splash_imageview);

        ObjectAnimator animator = ObjectAnimator.ofFloat(mImageView, "alpha", 0, 1).setDuration(DURATION);
        animator.start();
        animator.addListener(new AnimatorListenerAdapter(){
            @Override
            public void onAnimationEnd(Animator animation) {
                super.onAnimationEnd(animation);
                System.out.println("1");
                startActivity(LongInActivity.class,true);
            }
        });
    }


}

